package com.kimehwa.studyboot.controller;

import com.kimehwa.studyboot.annotation.UserLog;
import com.kimehwa.studyboot.bean.User;
import com.kimehwa.studyboot.exception.Result;
import com.kimehwa.studyboot.proenum.ModuleEnum;
import com.kimehwa.studyboot.proenum.OperationEnum;
import com.kimehwa.studyboot.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author xiaodongguan
 * @since 2021-07-11 18:14
 */
@Slf4j
@RestController
public class UserController {
    @Autowired
    private UserService userService;

//    @UserLog(module = ModuleEnum.USER, title = "批量更新用户", type = OperationEnum.MODIFY)
//    @PostMapping("updateBatchUser")
//    public Result<Boolean> updateBatchUser(@Validated @RequestBody ValidationList<User> userList) {
//        return Result.success(null);
//    }

    @UserLog(module = ModuleEnum.USER, title = "新增用户", type = OperationEnum.ADD)
    @PostMapping("insertUser")
    public Result<Boolean> insertUser(@RequestBody User user) {
        return Result.success(null);
    }





}
